﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<IEnumerable<Sisocana.Core.Models.WSBusquedaModel>>" %>

<script language="javascript" type="text/javascript">
    $(document).ready(function () {
        $("p a, input:submit,input:file ").button();
    });
</script>
   
<p>
    <%: Html.ActionLink("Create New", "CreateSearch", new { id = ViewData["idSitio"] })%>
</p>
<%if (Model != null && Model.Count() != 0){ %>
<table>
    <tr>
        <th></th>
        <th>
            Name
        </th>
        <th>
            Url
        </th>
        <th>
            Description
        </th>

    </tr>

<% foreach (var item in Model) { %>
    <tr>
        <td>
            <%--<%: Html.ActionLink("Edit", "EditSearch", new { id = item.id })%> |
            <%: Html.ActionLink("Delete", "Delete", new { id=item.id }) %>--%>
            <%= Html.MakeImgLink(Url.Action("EditSearch", "Site", new { id = item.id }), "Edit", "edit.png")%> |
            <%= Html.MakeImgLink(Url.Action("DeleteSearch", "Site", new { id = item.id }), "Delete", "delete.png")%>



        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.nombre) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.url) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.descripcion) %>
        </td>

    </tr>
<% } %>

</table>
<% } %>



